<template>
  <li>
    <label>
      <input @click="changedone(todo.id)" type="checkbox" :checked="todo.done">
      <span>{{ todo.title }}</span>
    </label>
    <button class="btn btn-danger" style="display: none">删除</button>
  </li>
</template>

<script>
export default {
  name: "TodoItem",
  props:["todo","change"],
  methods:{
    changedone(id){
      this.change(id)
    }
  }
}
</script>

<style scoped>

</style>
